<?php

/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class SendToFriendForm extends CFormModel
{
	public $from_email;
	public $from_name;
	public $to_email;
	public $message;
	public $verifyCode;

	public function rules()
	{
		return array(
			array('from_email', 'required'),
			array('from_email', 'email'),
			array('from_name', 'required'),
			array('to_email', 'required'),
			array('to_email', 'email'),
			array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
	}

	public function attributeLabels()
	{
		return array(
			'from_email'		=> t('From Email'),
			'from_name'			=> t('From Name'),
			'to_email'			=> t('To Email'),
			'message'			=> t('Message'),
			'verifyCode'		=> t('Verify Code'),
		);
	}
}
